import { createStore } from 'vuex'
import user from "@/store/modules/user";
import game from "@/store/modules/game";

export default createStore({
  getters: {
    router: state => state.user.routes,
    roles: state => state.user.roles,
    permissions: state => state.user.permissions,
    username: state => state.user.username,
    nickname: state => state.user.nickname,
    token: state => state.user.token,
    sidebarRouters: state => state.user.sidebarRouters,
    avatar: state => state.user.avatar,
    //游戏配置信息
    gameConfig: state => state.game.configInfo
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    user,
    game
  }
})
